const notFind =
    () => import( /* webpackChunkName: "404" */ "pages/404/404.vue")
const home =
    () => import( /* webpackChunkName: "sph-home" */ "pages/home/home.vue")
const login =
    () => import( /* webpackChunkName: "sph-login" */ "pages/login/login.vue")
const register =
    () => import( /* webpackChunkName: "sph-register" */ "pages/register/register.vue")
const shopcart =
    () => import( /* webpackChunkName: "sph-shopcart" */ "pages/shopcart/shopcart.vue")
const order =
    () => import( /* webpackChunkName: "sph-order" */ "pages/order/order.vue")
const search =
    () => import( /* webpackChunkName: "sph-search" */ "pages/search/search.vue")
const detail =
    () => import( /* webpackChunkName: "sph-detail" */ "pages/detail/detail.vue")
export default [{
        name: "search",
        path: "/search/:keyword?",
        component: search,
        meta:{
            showNav:false
        },
        props:route=>({
            keyword:route.params.keyword,
            categoryid:route.query.categoryid,
            categoryname:route.query.categoryname
        })
    },
    {
        name: "order",
        path: "/order",
        component: order
    },
    {
        name: "shopcart",
        path: "/shopcart",
        component: shopcart,
        meta:{
            showNav:false
        }
    },
    {
        name: "register",
        path: "/register",
        component: register,
        meta: {
            hideFooter: true
        }
    },
    {
        name: "login",
        path: "/login",
        component: login,
        meta: {
            hideFooter: true
        }
    },
    {
        name: "detail",
        path: "/detail",
        component: detail,
        meta:{
            showNav:false
        }
    },
    {
        name: "home",
        path: "/home",
        component: home,
        meta:{
            showNav:true
        }
    },
    {
        path: "/",
        redirect: "/home"
    },

    {
        name: "404",
        path: "/404",
        component: notFind
    },
    {
        path: "*",
        redirect: "/404"
    }
]